import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CashierOccupyInfoVO, CashierOccupyInfoQuery } from '@/api/payment/cashierOccupyInfo/types';

/**
 * 查询收银员占用信息列表
 * @param query
 * @returns {*}
 */

export const listCashierOccupyInfo = (query?: CashierOccupyInfoQuery): AxiosPromise<CashierOccupyInfoVO[]> => {
  return request({
    url: '/mall/cashier/list',
    method: 'get',
    params: query
  });
};


/**
 * 查询收银员占用信息详细
 * @param id
 */
export const getCashierOccupyInfo = (data: any): AxiosPromise<CashierOccupyInfoVO> => {
  return request({
    url: '/mall/cashier/getCashier',
    method: 'post',
    data: data
  });
}

export const createCashierOrder = (id:number|string|undefined) => {
  return request({
    url: '/mall/cashier/createCashierOrder/'+id,
    method: 'post'
  });
}
